/*
 * @Description:
 * @Author:Huang Xin Ming
 * @Date:2024-11-07 10:33:14
 * @LastEditors:Huang Xin Ming
 * @LastEditTime:2024-11-07 10:39:21
 */

import { createPinia } from "pinia";
import { createPersistedState } from "pinia-plugin-persistedstate";

const pinia = createPinia();
// 数据持久化
pinia.use(
  createPersistedState({
    storage: {
      getItem: uni.getStorageSync,
      setItem: uni.setStorageSync,
    }
  })
);

export default pinia;
